﻿@*费用使用列表*@
@{
    int num = 1;
    DateTime now = DateTime.Now;
    }
  <table class="tables tables-bordered tables-hover itemDetail" addbutton="新增" width="100%">
    <thead>
        <tr>

            <th type="text" name="TheCostActualList[#index#].itemInt" defaultval="#index#" size="6" fieldclass="digits">序号</th>
            <th type="text" name="TheCostActualList[#index#].Ca_Item" size="50" >凭证名目</th>
            <th type="text" name="TheCostActualList[#index#].Ca_Amount" defaultval="0.0" size="12" fieldclass="number">金额</th>
            <th type="date" name="TheCostActualList[#index#].Ca_InvoiceDate" size="15" defaultVal="@now.ToString("yyyy-MM-dd")">开票日期</th>
            <th type="text" name="TheCostActualList[#index#].Ca_InvoiceNumb" size="15">发票编号</th>
            <th type="text" name="TheCostActualList[#index#].Ca_Remark" size="40">备注</th>
            <th type="del" width="60">删除</th>

        </tr>
        
    </thead>
    <tbody>
        @if (Model.Count == 0 && ViewBag.tag=="1")
        {
            <script>alert("没有当月费用计划")</script>
            
        }
        @for (int index = 0; index < Model.Count; index++)
        {

            <tr>
                <td>
                    <input type="text" style="width:90%;  margin:auto auto auto 2px;" name="TheCostActualList[@index].itemInt" value=@num value="1" size="6" fieldclass="digits"></input>
                </td>
                <td>
                    <input type="text" size="50" style="width:90%;  margin:auto auto auto 2px;" class=" textInput" name="TheCostActualList[@index].Ca_Item" value=@Model[index].Cp_Item></input>
                </td>
                <td>
                    <input type="text" size="12" style="width:90%;  margin:auto auto auto 2px;" fieldclass="number" name="TheCostActualList[@index].Ca_Amount" value=@Model[index].Cp_ActualAmount></input>
                </td>
                <td>
                    <input type="text" class="date textInput required" format="yyyy-MM-dd" value="@now.ToString("yyyy-MM-dd")" size="15" name="TheCostActualList[@index].Ca_InvoiceDate"></input>
                    <a class="inputDateButton" href="javascript:void(0)">选择</a>
                </td>
                <td>
                    <input type="text" size="15" style="width:90%;  margin:auto auto auto 2px;" fieldclass="number" name="TheCostActualList[@index].Ca_InvoiceNumb"></input>
                </td>
                <td>
                    <input type="text" style="width:90%;  margin:auto auto auto 2px;" name="TheCostActualList[@index].Ca_Remark" size="40"></input>
                </td>
                <td><a href="javascript:void(0)" class="btnDel ">删除</a></td>

            </tr>
            num++;
        }

</table>